<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>内敛表达式</title>
</head>
<body>
<div th:text="${data}">xxx</div>
<h3 th:text="${data}">xxx</h3>

<h2>内敛文本：th:inline="text",通常在div标签中写</h2>
<div th:inline="text">
    数据：[[${data}]]
</div>

<h2>内敛脚本(在js获取后台传过来的值)：th:inline="javascript"</h2>
<script type="text/javascript" th:inline="javascript">
    function showData() {
        // alter(${data})   //无效
        alert([[${data}]])
    }
</script>
<button type="button" onclick="showData()">showData</button>
</body>
</html>